1. Field of the Invention
The present invention generally relates to a status detection method, and more particularly, to a status detection method for a storage device.
2. Description of Related Art
A non-volatile memory can retain the data stored therein for a long time even when no power is supplied. Thus, along with the widespread of technical products, different types of non-volatile memories, such as read-only memory (ROM), programmable read-only memory (PROM), electrically erasable and programmable read-only memory (EEPROM), and flash memory, have been broadly applied to various products. In addition, other non-volatile memories, such as magnetoresistive random access memory (MRAM), phase-change memory (PRAM), and ferroelectric random access memory (FeRAM), are also commercialized in small quantities. Presently, flash memory is broadly applied to computer devices (for example, the writing systems for network boxes, screens, and memory cards, and the input/output systems of computers) due to its many advantages, such as vibration proofness, low power consumption, small volume, light weight, and fast access speed, etc.
The storage area of a non-volatile memory, such as a flash memory, contains many blocks for storing data. These memory blocks are arranged as an array therefore are also referred as a memory block array, and each of the memory blocks has a storage space of a specific capacity. Data writing, reading, and erasing are performed to a memory electrically. Thus, some bits in the memory may become erroneous after the memory is used for some time, and these erroneous bits are referred as error bits. In conventional techniques, when an error bit is found in a memory block, the error bit can be corrected through bit correction, and the corrected bit is marked as an error correct bit or an error correct code (ECC).
Conventionally, memory blocks are managed according to the number of ECCs in these memory blocks. For example, the addresses of memory blocks in a flash memory are respectively recorded in a normal block area and a disabled block area. When it is determined that the number of ECCs in a memory block is lower than a predetermined value (N-Bit ECC; N is greater than or equal to 1), the address of the memory block is recorded (for example, classified) into the normal block area. Accordingly, the memory blocks corresponding to the addresses recorded in the normal block area can be accessed normally. Contrarily, when it is determined that the number of ECCs in a memory block is higher than the predetermined value, which means an error may occur if data is stored in the memory block, the address of the memory block is recorded into the disabled block area. When next time a data is stored into the flash memory, the data will not be stored in the memory blocks corresponding to the addresses recorded in the disabled block area. When the disabled block area has no more available space, the flash memory is locked so that new data cannot be written therein anymore.
Generally speaking, the more memory blocks have ECCs in a flash memory storage device, the lower status the flash memory storage device has. However, a general user has no way to obtain information about the status of a storage device.